package scuba.DiveBuddy.Fragments.NewLogEntry;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.*;
import scuba.DiveBuddy.R;

/**
 * @author Alex Anderson
 * @version 1.0
 * @since {26/02/14}
 */
public class LogLocationFragment extends Fragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_editor_location, container, false);

        //final GoogleMap map = ((SupportMapFragment)getFragmentManager().findFragmentById(R.id.map)).getMap();
        //map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
            //@Override
            //public void onMapClick(LatLng latLng) {
            //   //todo:
            //}
        //});
        return v;
    }

    @Override
    public void onDestroyView() {

        //Need to destroy the Map fragment to bypass the duplicate IDs Error.
        //http://stackoverflow.com/questions/14083950/duplicate-id-tag-null-or-parent-id-with-another-fragment-for-com-google-androi
        //SupportMapFragment smf = ((SupportMapFragment)getFragmentManager().findFragmentById(R.id.map));
       // if(smf != null)
         //   getFragmentManager().beginTransaction().remove(smf).commit();

        super.onDestroyView();
    }
}
